﻿Imports extremo

Public Class BReserva

    Property ReservaForm As ReservaForm


    Private Sub btnBuscar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBuscar.Click
        Dim criterio As String = Me.txtBuscar.Text
        'MsgBox(criterio)

        Dim negocio As New ReservaNegocio
        Dim categorias As Collection = negocio.buscarPorFecha_reserva(criterio)
        Me.dgvCategorias.DataSource = categorias
        Me.dgvCategorias.EditMode = False

        Me.dgvCategorias.Columns(0).HeaderText = "Idreserva"
        Me.dgvCategorias.Columns(1).HeaderText = "IDevento"
        Me.dgvCategorias.Columns(2).HeaderText = "IDusuario"
        Me.dgvCategorias.Columns(3).HeaderText = "Fecha_reserva"
        Me.dgvCategorias.Columns(4).HeaderText = "Deporte"
        Me.dgvCategorias.Columns(5).HeaderText = "Cantidad"

    End Sub

    Private Sub BReserva_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        With Me.dgvCategorias.ColumnHeadersDefaultCellStyle
            .BackColor = Color.Red
            .ForeColor = Color.White
        End With

    End Sub

    Private Sub btnCancelar_Click(sender As System.Object, e As System.EventArgs) Handles btnCancelar.Click
        Me.Close()
    End Sub

    Private Sub dgvCategorias_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvCategorias.CellContentClick

    End Sub
End Class